package com.k7k7.util;

import java.net.Inet4Address;
import java.net.InetAddress;
import java.net.UnknownHostException;

/**
 * Created by IntelliJ IDEA.
 * User: Administrator
 * Date: 2009-4-22
 * Time: 16:38:42
 */
public class NetUtil {
	public static String getAddress() {
		InetAddress add=null;
		try {
			add=Inet4Address.getLocalHost();
		} catch (UnknownHostException e) {
			e.printStackTrace();
		}
		assert add != null;
		return add.getHostAddress();
	}

	public static void main(String[] args) {
		System.out.println(getAddress());
	}
}
